module.exports = {
  plugins: [
    'postcss-preset-env',
    require('autoprefixer')({
      overrideBrowserslist: ['Android >= 4.0', 'iOS >= 8']
    }),
    require('cssnano')({
      preset: [
        'default',
        {
          discardComments: {
            removeAll: true,
            cssDeclarationSorter: true
          }
        }
      ]
    }),
    require('postcss-pxtorem')({
      rootValue({ file }) {
        return file.indexOf('vant') !== -1 ? 37.5 : 75;
      },
      propList: ['*'],
      unitPrecision: 3
    })
  ]
};
